using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using AjaxControlToolkit;

public partial class Project : System.Web.UI.Page
{

	protected void Page_Load(object sender, EventArgs e)
	{
		Systepic.Projects.Project p = null;

		if (Request.QueryString["id"] != null)
		{
			int id = int.Parse(Request.QueryString["id"]);
			p = ProjectsHelper.GetProjectById(id);

			// Make sure the project exists
			if(p == null)
			{
				this.lblTitle.Text = "There are no project with this id";
				return;
			}
		}
		else Response.Redirect("~/Default.aspx");

		this.pnlProject.Visible = true;
		this.lblTitle.Text = p.Name;
	}
}
